-- GENERATED SPELL FOR [Anvilrage Reservist] --


function spell0_8901(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(9128,pUnit)
pUnit:RegisterEvent('Sorts_8901', 620, 1)
end

function spell1_8901(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8901', 10312, 1)
end

function spell2_8901(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8901', 580, 1)
end

function spell3_8901(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8901', 572, 1)
end

function Sorts_8901(pUnit, Event)
local choix_sorts_8901 = math.random(0, 3)
if choix_sorts_8901 == 0 then
pUnit:RegisterEvent('spell0_8901', 1, 1)
end
if choix_sorts_8901 == 1 then
pUnit:RegisterEvent('spell1_8901', 1, 1)
end
if choix_sorts_8901 == 2 then
pUnit:RegisterEvent('spell2_8901', 1, 1)
end
if choix_sorts_8901 == 3 then
pUnit:RegisterEvent('spell3_8901', 1, 1)
end
end

function mob8901_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8901', math.random(1500, 3000), 1)
end

function mob8901_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8901_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8901_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8901, 1, 'mob8901_Action')
RegisterUnitEvent(8901, 2, 'mob8901_Leave')
RegisterUnitEvent(8901, 3, 'mob8901_Kill')
RegisterUnitEvent(8901, 4, 'mob8901_Die')
